import React from 'react';
import { Result, Button } from 'antd';
import { useNavigate } from 'react-router-dom';

const Forbidden = () => {
    const navigate = useNavigate();

    return (
        <div style={{
            display: 'flex',
            justifyContent: 'center',
            alignItems: 'center',
            minHeight: '100vh',
            background: 'linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%)',
        }}>
            <Result
                status="403"
                title="403"
                subTitle="抱歉，您没有权限访问此页面。"
                extra={
                    <Button
                        type="primary"
                        onClick={() => navigate('/dashboard')}
                        style={{
                            background: 'linear-gradient(135deg, #6366f1, #8b5cf6)',
                            border: 'none',
                            borderRadius: 8,
                            height: 40,
                            paddingInline: 24
                        }}
                    >
                        返回首页
                    </Button>
                }
            />
        </div>
    );
};

export default Forbidden;
